package org.example.model;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * 学生类，用来存储学生的信息
 * @author Alex
 * @version 1.0
 * @since 1.0
 */
@XmlRootElement(name = "Student")
public class Student {
	/**
	 * Student's ID
	 * 学生的学号
	 */
	private String id;
	/**
	 * Student's Chinese name
	 * 学生的中文名
	 */
	private String nameCN;
	/**
	 * Student's French name
	 * 学生的法语名
	 */
	private String nameFR;
	/**
	 * Student's class
	 * 学生所在的班级
	 */
	private String className;
	/**
	 * Gender of students
	 * 学生的性别
	 * @see Gender
	 */
	private Gender gender;
	
	public Student() {
	}
	
	public Student(String id, String nameCN, String nameFR, String className, Gender gender) {
		this.id = id;
		this.nameCN = nameCN;
		this.nameFR = nameFR;
		this.className = className;
		this.gender = gender;
	}
	
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public String getNameCN() {
		return nameCN;
	}
	
	public void setNameCN(String nameCN) {
		this.nameCN = nameCN;
	}
	
	public String getNameFR() {
		return nameFR;
	}
	
	public void setNameFR(String nameFR) {
		this.nameFR = nameFR;
	}
	
	public String getClassName() {
		return className;
	}
	
	public void setClassName(String className) {
		this.className = className;
	}
	
	public Gender getGender() {
		return gender;
	}
	
	public void setGender(Gender gender) {
		this.gender = gender;
	}
	
	@Override
	public String toString() {
		final StringBuffer sb = new StringBuffer();
		sb.append("ID: ").append(id).append("\t");
		sb.append("Chinese name: ").append(nameCN).append("\t");
		sb.append("French name: ").append(nameFR).append("\t");
		sb.append("Class: ").append(className).append("\t");
		sb.append("Gender: ").append(gender);
		return sb.toString();
	}
}

